<template id="collage_present">
	<div class="collage_present">
		
	<!--头部-->
		<div class="about_header">

			<div class="about_title">
				<router-link :to="{path:'/collage_coach',query:{id:coach.id}}"><img src="../../assets/images/class/jiantou_03.png" /></router-link>
			</div>
		</div>
		<!--头部结束-->	
		
		<!--课程介绍-->
		<div class="collage_most">
			
			<!--课程特点-->
			<div class="collage_kile">
				<h1>课程特点</h1>
				<p>{{coach.characteristic}}</p>
			</div>
			<!--课程特点结束-->
			<!--适用人群-->
			<div class="collage_kile">
				<h1>适用人群</h1>
				<p>{{coach.intendedfor}}</p>
			</div>
			<!--适用人群结束-->
			<!--练习频次-->
			<div class="collage_kile">
				<h1>练习频次</h1>
				<p v-for="(item,index) in most" :key = index>
					{{item}}

				</p>
				
			</div>
			<!--练习频次结束-->
			
			<!--教练信息-->
			<div class="collage_message">
				<h1>教练介绍</h1>
				<dl>
					<dt><img v-lazy="coach.photo"/></dt>
					<dd>
						<div class="collage_dd"><p>{{coach.name}}</p><div class="collage_know" @click.stop = 'underCoach(coach.coachid)'>了解TA</div></div>
						<p>{{coach.intendedfor}}</p>
					</dd>
				</dl>
			</div>
			<!--教练信息结束-->
			
		</div>
		<!--课程介绍结束-->
		
		
	</div>
</template>

<script>
	export default {
		data() {
			return {
				coach: [],
		        id:'',
		        most:[]

			}
		},
		computed: {

		},
		components: {},
		created() {
			let _this = this
			let qs = require('qs');
			var SESSION_ID = JSON.parse(window.localStorage.getItem('sessiond'))
			let obj = {
				//请求的参数
				id: _this.$route.query.id,

			};

			_this.$axios.post("/yujiaextend/user/findGymActionById", qs.stringify(obj), {
				headers: {
					'Content-Type': 'application/x-www-form-urlencoded'
				}

			}).then(function(response) {
				_this.coach =response.data.data
				_this.id = response.data.data.id
				_this.most = response.data.data.proposal.split('&&')
				// console.log(_this.most)
			
				//console.log(_this.id)

				_this.brief = decodeURI(response.data.data.brief)

			}).catch(function(error) {
				console.log(error);
			});
		},
		
		methods: {

			underCoach(coachid){
				this.$router.push({
					path:'/about_coach',
					query:{
						coachid
					}
				})
			}
		}

	}
</script>

<style>
	@import "../../assets/css/collage_present.css";
</style>